import store from "./store";

// 从 store 本身推断出状态类型 RootState 和 AppDispatch
export type RootState = ReturnType<typeof store.getState>;

// 推断出 AppDispatch 的类型 推断出类型: {posts: PostsState, comments: CommentsState, users: UsersState}
export type AppDispatch = typeof store.dispatch;